<template>
	<view>
		<view class="uni-padding-wrap uni-common-mt">
			<view class="uni-btn-v">
				<navigator url="navigate/navigate?User=huangyuxin&userid=1234">
				<button type="default">跳转到新的页面</button></navigator>
				<navigator url="redirect/redirect" open-type="redirect">
					<button type="default">在当前页打开</button>
				</navigator>
				<navigator url="redirect/redirect" open-type="reLaunch">
					<button type="default"新建调用栈></button>
				</navigator>
				<navigator url="/pages/tabBar/tabcompage/tabcompage" open-type="switchTab">
					<button type="default">跳转tab页面</button>
				</navigator>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				title:'navigator',
				user:"huangyuxin",
				uid:123456,
				list:[1,2,3]
			}
		},
		onLoad(options) {
			console.log("navigator页面加载");
		},
		onShow() {
			console.log("navigator------onShow");
		},
		onPullDownRefresh() {
			console.log("navigator------onPullDownRefresh开始刷新");
			setTimeout(()=>{
				uni.stopPullDownRefresh();
			},2000)
		},
		methods: {
			goNewPage(){
				uni.navigateTo({
					url:"navigate/navigate?User="+this.user+"&userid="+this.uid
				})
			}
		}
	}
</script>

<style>

</style>
